import { RouteOptionsBase } from './../common/http/router/routeDecorators';
import * as Koa from 'koa';
import { route, RouteOptionsVerify } from '../common';
const pkgJSON = require('../../package.json');

class SystemController { 
    @route(new RouteOptionsVerify('get', '/api/sys/version'))
    async getAPIVersion(ctx: Koa.Context, next) {
        ctx.response.body = {
            version: pkgJSON.version
        }
        await next();
    }
}